public class Dog extends Animal{

    public void cry(){
        System.out.println("小狗汪汪叫");
    }

    public String m1(){
        return "Dog的m1方法";
    }
    public AAA m2(){
        return null;
    }
    public String m3(){
        return "子类m3方法";
    }
//    子类方法不能缩小父类方法的访问权限
}


class AAA{

}


class BBB extends AAA{

}